import request from "@/utils/request";

const baseUrl = "partyBase/";
/**
 * 获取党员信息
 * @param pagination
 * @param keyword
 * @returns {AxiosInstance}
 */
export function page(pagination, keyword) {
    return new request({
        url: `${baseUrl}list`,
        method: "GET",
        params: {...pagination, ...keyword}
    })
}

export function getTeacherInfo(pagination, keyword) {
    return new request({
        url: `${baseUrl}list`,
        method: "GET",
        params: {...pagination, ...keyword}
    })
}

/**
 * 修改单个党员信息
 * @returns {AxiosInstance}
 * @param data
 */
export function updateInfo(data) {
    return new request({
        url: `${baseUrl}`,
        method: "PUT",
        data: data
    })
}

/**
 * 新增单个党员
 * @returns {AxiosInstance}
 * @param data
 */
export function addInfo(data) {
    return new request({
        url: `${baseUrl}`,
        method: "POST",
        data: data
    })
}
